package com.sg.service.biz.rbff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.rbff.req.*;
import com.sg.dto.biz.rbff.res.*;
import com.sg.service.biz.rbff.AlbumService;
import com.wicket.okrdataassets.integration.AlbumService;
import com.wicket.okrdataassets.integration.ResourceFileService;
import com.wicket.okrdataassets.integration.UnstructuredResourcesService;
import com.wicket.okrdataassets.integration.dto.*;
import com.sg.common.exception.Assert;
import com.wicket.okrrbff.common.exception.BizException;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class AlbumServiceImpl implements AlbumService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    com.sg.service.biz.dataassets.AlbumService fwDataassetsAlbumClient;

    @Resource
    com.sg.service.biz.dataassets.ResourceFileService fwDataassetsResourceFileClient;
    @Resource
    com.sg.service.biz.dataassets.UnstructuredResourcesService fwDataassetsUnstructuredResourcesClient;

    /**
     * B8查询专辑详情[10336]
     * gen by moon at 5/30/2025, 3:43:13 PM
     */
    @Trace(operationName = "B8查询专辑详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAlbumDetailRespDto queryAlbumDetail(BffQueryAlbumDetailReqDto reqDto) {


        QueryAlbumDetailComRespDto queryAlbumDetailComRespDto_1 = null;
        AnalysisResourceFileObjectNameComRespDto analysisResourceFileObjectNameComRespDto_1 = null;
//步骤0: D8查询专辑详情(公共) - queryAlbumDetailCom
        QueryAlbumDetailComRespDto queryAlbumDetailComRespDto = null;
        QueryAlbumDetailComReqDto queryAlbumDetailComReqDto = new QueryAlbumDetailComReqDto();
        if (reqDto != null) {
            queryAlbumDetailComReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2026721_1
        }

        /*D8查询专辑详情(公共)[10327]   */

        queryAlbumDetailComRespDto = fwDataassetsAlbumClient.queryAlbumDetailCom(queryAlbumDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryAlbumDetailComRespDto_1 = queryAlbumDetailComRespDto;

//步骤1: D8分析资源文件归属对象名称(公共) - analysisResourceFileObjectNameCom
        AnalysisResourceFileObjectNameComRespDto analysisResourceFileObjectNameComRespDto = null;
        if (queryAlbumDetailComRespDto != null) {
            AnalysisResourceFileObjectNameComReqDto analysisResourceFileObjectNameComReqDto = new AnalysisResourceFileObjectNameComReqDto();
            if (queryAlbumDetailComRespDto != null) {
                analysisResourceFileObjectNameComReqDto.setResourceCopyRightType(queryAlbumDetailComRespDto.getAlbumOwner());//SimpleFieldAssign//sourceId:2037304_1
                analysisResourceFileObjectNameComReqDto.setResourceCopyRightHolderId(queryAlbumDetailComRespDto.getAlbumOwnerId());//SimpleFieldAssign//sourceId:2037305_1
            }

            /*D8分析资源文件归属对象名称(公共)[10451]   */
            Assert.isNull(analysisResourceFileObjectNameComReqDto.getResourceCopyRightType(), "B8查询专辑详情-D8分析资源文件归属对象名称(公共)-资源文件版权归属类型不能为空", false);
            Assert.isNull(analysisResourceFileObjectNameComReqDto.getResourceCopyRightHolderId(), "B8查询专辑详情-D8分析资源文件归属对象名称(公共)-资源文件版权归属对象ID不能为空", false);
            analysisResourceFileObjectNameComRespDto = fwDataassetsResourceFileClient.analysisResourceFileObjectNameCom(analysisResourceFileObjectNameComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            analysisResourceFileObjectNameComRespDto_1 = analysisResourceFileObjectNameComRespDto;
        }

        BffQueryAlbumDetailRespDto retData = new BffQueryAlbumDetailRespDto();
        if (queryAlbumDetailComRespDto_1 != null) {
            retData.setAlbumId(queryAlbumDetailComRespDto_1.getAlbumId());//SimpleFieldAssign//sourceId:2026733_1
            retData.setAlbumName(queryAlbumDetailComRespDto_1.getAlbumName());//SimpleFieldAssign//sourceId:2026734_1
            retData.setAlbumDescribe(queryAlbumDetailComRespDto_1.getAlbumDescribe());//SimpleFieldAssign//sourceId:2026735_1
            retData.setIsShare(queryAlbumDetailComRespDto_1.getIsShare());//SimpleFieldAssign//sourceId:2026740_1
            retData.setIsDefault(queryAlbumDetailComRespDto_1.getIsDefault());//SimpleFieldAssign//sourceId:2043939_1
            retData.setCreateTime(queryAlbumDetailComRespDto_1.getCreateTime());//SimpleFieldAssign//sourceId:2026741_1
            retData.setSubjectLifeCycle(queryAlbumDetailComRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:2028432_1
            retData.setOperateTime(queryAlbumDetailComRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:2026742_1
        }
        if (analysisResourceFileObjectNameComRespDto_1 != null) {
            retData.setCopyRightHolderName(analysisResourceFileObjectNameComRespDto_1.getCopyRightHolderName());//SimpleFieldAssign//sourceId:2037307_1
        }


        return retData;
    }

    /**
     * B8新增专辑[10296]
     * gen by moon at 11/17/2024, 5:30:37 PM
     */
    @Trace(operationName = "B8新增专辑")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddAlbumRespDto addAlbum(BffAddAlbumReqDto reqDto) {


        AddAlbumComRespDto addAlbumComRespDto_1 = null;
//virtualUsage D8查询专辑名称重复详情(公共)  73560
        QueryDuplicateAlbumNameDetailComRespDto queryDuplicateAlbumNameDetailComRespDto = null;
        QueryDuplicateAlbumNameDetailComReqDto queryDuplicateAlbumNameDetailComReqDto = new QueryDuplicateAlbumNameDetailComReqDto();
        queryDuplicateAlbumNameDetailComReqDto.setQuerySortTypeCode("CREATE_TIME_DESC");//sourceId:2028850_1_73560
        if (reqDto != null) {
            queryDuplicateAlbumNameDetailComReqDto.setAlbumName(reqDto.getAlbumName());//SimpleFieldAssign//sourceId:2028851_1_73560
            queryDuplicateAlbumNameDetailComReqDto.setAlbumOwner(reqDto.getAlbumOwner());//SimpleFieldAssign//sourceId:2028852_1_73560
            queryDuplicateAlbumNameDetailComReqDto.setAlbumOwnerId(reqDto.getAlbumOwnerId());//SimpleFieldAssign//sourceId:2028853_1_73560
            queryDuplicateAlbumNameDetailComReqDto.setCopyRightOriginalRoleMemberId(reqDto.getCopyRightOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2028854_1_73560
        }

        /*D8查询专辑名称重复详情(公共)[10360]   */
        Assert.isNull(queryDuplicateAlbumNameDetailComReqDto.getQuerySortTypeCode(), "B8新增专辑-D8查询专辑名称重复详情(公共)-查询排序类型不能为空", false);
        Assert.isNull(queryDuplicateAlbumNameDetailComReqDto.getAlbumName(), "B8新增专辑-D8查询专辑名称重复详情(公共)-专辑名称不能为空", false);
        Assert.isNull(queryDuplicateAlbumNameDetailComReqDto.getAlbumOwner(), "B8新增专辑-D8查询专辑名称重复详情(公共)-版权归属类型不能为空", false);
        queryDuplicateAlbumNameDetailComRespDto = fwDataassetsAlbumClient.queryDuplicateAlbumNameDetailCom(queryDuplicateAlbumNameDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((queryDuplicateAlbumNameDetailComRespDto != null && queryDuplicateAlbumNameDetailComRespDto.getAlbumList() != null && queryDuplicateAlbumNameDetailComRespDto.getAlbumList().size() > 0)) {
            //if(D8查询专辑名称重复详情(公共).专辑列表数据集条数 大于 0)  73561

//异常结束 73564
            throw new BizException("3R300100523", "对不起，专辑名称已存在~", false);
        }
//virtualUsage D8新增专辑(公共)  73565
        AddAlbumComRespDto addAlbumComRespDto = null;
        AddAlbumComReqDto addAlbumComReqDto = new AddAlbumComReqDto();
        addAlbumComReqDto.setIsDefault("FALSE");//sourceId:2026685_1_73565
        if (reqDto != null) {
            addAlbumComReqDto.setAlbumName(reqDto.getAlbumName());//SimpleFieldAssign//sourceId:2026677_1_73565
            addAlbumComReqDto.setAlbumDescribe(reqDto.getAlbumDescribe());//SimpleFieldAssign//sourceId:2026678_1_73565
            addAlbumComReqDto.setAlbumOwner(reqDto.getAlbumOwner());//SimpleFieldAssign//sourceId:2026680_1_73565
            addAlbumComReqDto.setAlbumOwnerId(reqDto.getAlbumOwnerId());//SimpleFieldAssign//sourceId:2026681_1_73565
            addAlbumComReqDto.setCopyRightOriginalRoleMemberId(reqDto.getCopyRightOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2026682_1_73565
            addAlbumComReqDto.setIsShare(reqDto.getIsShare());//SimpleFieldAssign//sourceId:2026684_1_73565
            addAlbumComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:2026688_1_73565
        }

        /*D8新增专辑(公共)[10295]   */
        Assert.isNull(addAlbumComReqDto.getAlbumName(), "B8新增专辑-D8新增专辑(公共)-专辑名称不能为空", false);
        Assert.isNull(addAlbumComReqDto.getAlbumOwner(), "B8新增专辑-D8新增专辑(公共)-版权归属类型不能为空", false);
        Assert.isNull(addAlbumComReqDto.getAlbumOwnerId(), "B8新增专辑-D8新增专辑(公共)-版权归属对象ID不能为空", false);
        Assert.isNull(addAlbumComReqDto.getIsShare(), "B8新增专辑-D8新增专辑(公共)-是否可分享不能为空", false);
        Assert.isNull(addAlbumComReqDto.getSubjectLifeCycle(), "B8新增专辑-D8新增专辑(公共)-主体生命周期不能为空", false);
        addAlbumComRespDto = fwDataassetsAlbumClient.addAlbumCom(addAlbumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addAlbumComRespDto_1 = addAlbumComRespDto;

        BffAddAlbumRespDto retData = new BffAddAlbumRespDto();
        if (addAlbumComRespDto_1 != null) {
            retData.setAlbumId(addAlbumComRespDto_1.getAlbumId());//SimpleFieldAssign//sourceId:2026796_1
        }


        return retData;
    }

    /**
     * B8修改专辑[10334]
     * gen by moon at 11/14/2024, 1:20:04 PM
     */
    @Trace(operationName = "B8修改专辑")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateAlbumRespDto updateAlbum(BffUpdateAlbumReqDto reqDto) {


        //步骤0: D8修改专辑(公共) - updateAlbumCom
        UpdateAlbumComRespDto updateAlbumComRespDto = null;
        UpdateAlbumComReqDto updateAlbumComReqDto = new UpdateAlbumComReqDto();
        if (reqDto != null) {
            updateAlbumComReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2026700_1
            updateAlbumComReqDto.setAlbumName(reqDto.getAlbumName());//SimpleFieldAssign//sourceId:2026701_1
            updateAlbumComReqDto.setAlbumDescribe(reqDto.getAlbumDescribe());//SimpleFieldAssign//sourceId:2026702_1
            updateAlbumComReqDto.setIsShare(reqDto.getIsShare());//SimpleFieldAssign//sourceId:2026704_1
            updateAlbumComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:2026809_1
        }

        /*D8修改专辑(公共)[10322]   */
        Assert.isNull(updateAlbumComReqDto.getAlbumId(), "B8修改专辑-D8修改专辑(公共)-专辑ID不能为空", false);
        updateAlbumComRespDto = fwDataassetsAlbumClient.updateAlbumCom(updateAlbumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffUpdateAlbumRespDto retData = new BffUpdateAlbumRespDto();


        return retData;
    }

    /**
     * B8删除专辑[10335]
     * gen by moon at 11/14/2024, 1:20:06 PM
     */
    @Trace(operationName = "B8删除专辑")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteAlbumRespDto deleteAlbum(BffDeleteAlbumReqDto reqDto) {


        //步骤0: D8查询专辑详情(公共) - queryAlbumDetailCom
        QueryAlbumDetailComRespDto queryAlbumDetailComRespDto = null;
        QueryAlbumDetailComReqDto queryAlbumDetailComReqDto = new QueryAlbumDetailComReqDto();
        if (reqDto != null) {
            queryAlbumDetailComReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2026968_1
        }

        /*D8查询专辑详情(公共)[10327]   */
        Assert.isNull(queryAlbumDetailComReqDto.getAlbumId(), "B8删除专辑-D8查询专辑详情(公共)-专辑ID不能为空", false);
        queryAlbumDetailComRespDto = fwDataassetsAlbumClient.queryAlbumDetailCom(queryAlbumDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//步骤1: D8执行生命周期判断(公共) - implementSubjectLifeCycleJudgeCom
        ImplementSubjectLifeCycleJudgeComRespDto implementSubjectLifeCycleJudgeComRespDto = null;
        if (queryAlbumDetailComRespDto != null) {
            ImplementSubjectLifeCycleJudgeComReqDto implementSubjectLifeCycleJudgeComReqDto = new ImplementSubjectLifeCycleJudgeComReqDto();
            implementSubjectLifeCycleJudgeComReqDto.setLifecyCycleOperationType("DELETE");//sourceId:2026980_1
            if (queryAlbumDetailComRespDto != null) {
                implementSubjectLifeCycleJudgeComReqDto.setSubjectLifeCycle(queryAlbumDetailComRespDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:2026979_1
                implementSubjectLifeCycleJudgeComReqDto.setIsValid(queryAlbumDetailComRespDto.getIsValid());//SimpleFieldAssign//sourceId:2026981_1
            }

            /*D8执行生命周期判断(公共)[10346]   */
            Assert.isNull(implementSubjectLifeCycleJudgeComReqDto.getLifecyCycleOperationType(), "B8删除专辑-D8执行生命周期判断(公共)-生命周期操作类型不能为空", false);
            Assert.isNull(implementSubjectLifeCycleJudgeComReqDto.getSubjectLifeCycle(), "B8删除专辑-D8执行生命周期判断(公共)-主体生命周期不能为空", false);
            Assert.isNull(implementSubjectLifeCycleJudgeComReqDto.getIsValid(), "B8删除专辑-D8执行生命周期判断(公共)-是否作废不能为空", false);
            implementSubjectLifeCycleJudgeComRespDto = fwDataassetsUnstructuredResourcesClient.implementSubjectLifeCycleJudgeCom(implementSubjectLifeCycleJudgeComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }

//步骤2: D8删除专辑(公共) - deleteAlbumCom
        DeleteAlbumComRespDto deleteAlbumComRespDto = null;
        DeleteAlbumComReqDto deleteAlbumComReqDto = new DeleteAlbumComReqDto();
        if (reqDto != null) {
            deleteAlbumComReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2026720_1
        }

        /*D8删除专辑(公共)[10326]   */
        Assert.isNull(deleteAlbumComReqDto.getAlbumId(), "B8删除专辑-D8删除专辑(公共)-专辑ID不能为空", false);
        deleteAlbumComRespDto = fwDataassetsAlbumClient.deleteAlbumCom(deleteAlbumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffDeleteAlbumRespDto retData = new BffDeleteAlbumRespDto();


        return retData;
    }

    /**
     * B8新增专辑分享记录表[10337]
     * gen by moon at 11/19/2024, 8:30:03 PM
     */
    @Trace(operationName = "B8新增专辑分享记录表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddAlbumShareRecRespDto addAlbumShareRec(BffAddAlbumShareRecReqDto reqDto) {


        AddAlbumShareRecRespDto addAlbumShareRecRespDto_1 = null;
//步骤0: D8新增专辑分享记录表 - addAlbumShareRec
        AddAlbumShareRecRespDto addAlbumShareRecRespDto = null;
        AddAlbumShareRecReqDto addAlbumShareRecReqDto = new AddAlbumShareRecReqDto();
        if (reqDto != null) {
            addAlbumShareRecReqDto.setShareAlbumId(reqDto.getShareAlbumId());//SimpleFieldAssign//sourceId:2026743_1
            addAlbumShareRecReqDto.setShareObjectTypeCode(reqDto.getShareObjectTypeCode());//SimpleFieldAssign//sourceId:2026744_1
            addAlbumShareRecReqDto.setShareObjectId(reqDto.getShareObjectId());//SimpleFieldAssign//sourceId:2026785_1
            addAlbumShareRecReqDto.setShareObjectOriginalRoleMemberId(reqDto.getShareObjectOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2026746_1
            addAlbumShareRecReqDto.setSharerName(reqDto.getSharerName());//SimpleFieldAssign//sourceId:2028887_1
            addAlbumShareRecReqDto.setReciveObjectTypeCode(reqDto.getReciveObjectTypeCode());//SimpleFieldAssign//sourceId:2026747_1
            addAlbumShareRecReqDto.setReciveObjectId(reqDto.getReciveObjectId());//SimpleFieldAssign//sourceId:2026786_1
            addAlbumShareRecReqDto.setReciveObjectOriginalRoleMemberId(reqDto.getReciveObjectOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2026749_1
            addAlbumShareRecReqDto.setRecipientName(reqDto.getRecipientName());//SimpleFieldAssign//sourceId:2028888_1
        }

        /*D8新增专辑分享记录表[10323]   */
        Assert.isNull(addAlbumShareRecReqDto.getShareAlbumId(), "B8新增专辑分享记录表-D8新增专辑分享记录表-分享的专辑ID不能为空", false);
        Assert.isNull(addAlbumShareRecReqDto.getShareObjectTypeCode(), "B8新增专辑分享记录表-D8新增专辑分享记录表-分享对象的类型编码不能为空", false);
        Assert.isNull(addAlbumShareRecReqDto.getShareObjectId(), "B8新增专辑分享记录表-D8新增专辑分享记录表-分享对象ID不能为空", false);
        Assert.isNull(addAlbumShareRecReqDto.getReciveObjectTypeCode(), "B8新增专辑分享记录表-D8新增专辑分享记录表-接收对象的类型编码不能为空", false);
        Assert.isNull(addAlbumShareRecReqDto.getReciveObjectId(), "B8新增专辑分享记录表-D8新增专辑分享记录表-接收对象ID不能为空", false);
        addAlbumShareRecRespDto = fwDataassetsAlbumClient.addAlbumShareRec(addAlbumShareRecReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addAlbumShareRecRespDto_1 = addAlbumShareRecRespDto;

        BffAddAlbumShareRecRespDto retData = new BffAddAlbumShareRecRespDto();
        if (addAlbumShareRecRespDto_1 != null) {
            retData.setAlbumShareRecId(addAlbumShareRecRespDto_1.getAlbumShareRecId());//SimpleFieldAssign//sourceId:2026759_1
        }


        return retData;
    }

    /**
     * B8查询专辑列表[10338]
     * gen by moon at 3/30/2025, 3:39:33 PM
     */
    @Trace(operationName = "B8查询专辑列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAlbumListRespDto queryAlbumList(BffQueryAlbumListReqDto reqDto) {


        QueryPersonOrDeptAlbumListRespDto queryPersonOrDeptAlbumListRespDto_1 = null;
//步骤0: D8查询个人或部门的专辑列表 - queryPersonOrDeptAlbumList
        QueryPersonOrDeptAlbumListRespDto queryPersonOrDeptAlbumListRespDto = null;
        QueryPersonOrDeptAlbumListReqDto queryPersonOrDeptAlbumListReqDto = new QueryPersonOrDeptAlbumListReqDto();
        if (reqDto != null) {
            queryPersonOrDeptAlbumListReqDto.setAlbumQueryTypeCode(reqDto.getAlbumQueryTypeCode());//SimpleFieldAssign//sourceId:2027118_1
            queryPersonOrDeptAlbumListReqDto.setAlbumName(reqDto.getAlbumName());//SimpleFieldAssign//sourceId:2027124_1
            queryPersonOrDeptAlbumListReqDto.setTableTypeCode(reqDto.getTableTypeCode());//SimpleFieldAssign//sourceId:2027119_1
            queryPersonOrDeptAlbumListReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:2027120_1
            queryPersonOrDeptAlbumListReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2027121_1
            queryPersonOrDeptAlbumListReqDto.setQuerySortTypeCode(reqDto.getQuerySortTypeCode());//SimpleFieldAssign//sourceId:2027122_1
            queryPersonOrDeptAlbumListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:2027123_1
            queryPersonOrDeptAlbumListReqDto.setIsDefault(reqDto.getIsDefault());//SimpleFieldAssign//sourceId:2043992_1
        }

        /*D8查询个人或部门的专辑列表[10351]   */
        Assert.isNull(queryPersonOrDeptAlbumListReqDto.getAlbumQueryTypeCode(), "B8查询专辑列表-D8查询个人或部门的专辑列表-专辑查询类型不能为空", false);
        Assert.isNull(queryPersonOrDeptAlbumListReqDto.getTableTypeCode(), "B8查询专辑列表-D8查询个人或部门的专辑列表-归属内容表类型编码不能为空", false);
        Assert.isNull(queryPersonOrDeptAlbumListReqDto.getQuerySortTypeCode(), "B8查询专辑列表-D8查询个人或部门的专辑列表-查询排序类型不能为空", false);
        queryPersonOrDeptAlbumListRespDto = fwDataassetsAlbumClient.queryPersonOrDeptAlbumList(queryPersonOrDeptAlbumListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryPersonOrDeptAlbumListRespDto_1 = queryPersonOrDeptAlbumListRespDto;

        BffQueryAlbumListRespDto retData = new BffQueryAlbumListRespDto();
        if (queryPersonOrDeptAlbumListRespDto_1 != null) {
            retData.setAlbumList(queryPersonOrDeptAlbumListRespDto_1.getAlbumList().stream().map(item -> BeanUtil.toBean(item, BffAlbumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:2027133_1
        }


        retData.setPageNum(queryPersonOrDeptAlbumListRespDto.getPageNum());
        retData.setPageSize(queryPersonOrDeptAlbumListRespDto.getPageSize());
        retData.setTotal(queryPersonOrDeptAlbumListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryPersonOrDeptAlbumListRespDto.getTotalNum()) / Double.valueOf(queryPersonOrDeptAlbumListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B8修改专辑文件别名[10339]
     * gen by moon at 11/14/2024, 1:20:12 PM
     */
    @Trace(operationName = "B8修改专辑文件别名")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateAlbumFileRelationRespDto updateAlbumFileRelation(BffUpdateAlbumFileRelationReqDto reqDto) {


        //步骤0: D8修改专辑文件关系(公共) - updateAlbumFileRelationCom
        UpdateAlbumFileRelationComRespDto updateAlbumFileRelationComRespDto = null;
        UpdateAlbumFileRelationComReqDto updateAlbumFileRelationComReqDto = new UpdateAlbumFileRelationComReqDto();
        if (reqDto != null) {
            updateAlbumFileRelationComReqDto.setAlbumRelationId(reqDto.getAlbumRelationId());//SimpleFieldAssign//sourceId:2026775_1
            updateAlbumFileRelationComReqDto.setResourceFileAlias(reqDto.getResourceFileAlias());//SimpleFieldAssign//sourceId:2026776_1
        }

        /*D8修改专辑文件关系(公共)[10325]   */
        Assert.isNull(updateAlbumFileRelationComReqDto.getAlbumRelationId(), "B8修改专辑文件别名-D8修改专辑文件关系(公共)-专辑文档关系ID不能为空", false);
        updateAlbumFileRelationComRespDto = fwDataassetsAlbumClient.updateAlbumFileRelationCom(updateAlbumFileRelationComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffUpdateAlbumFileRelationRespDto retData = new BffUpdateAlbumFileRelationRespDto();


        return retData;
    }

    /**
     * B8查询专辑文件详情[10340]
     * gen by moon at 5/28/2025, 6:11:46 PM
     */
    @Trace(operationName = "B8查询专辑文件详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAlbumFileRelationDetailRespDto queryAlbumFileRelationDetail(BffQueryAlbumFileRelationDetailReqDto reqDto) {


        QueryFileOfAlbumDetailComRespDto queryFileOfAlbumDetailComRespDto_1 = null;
//步骤0: D8查询专辑下文件详情(公共) - queryFileOfAlbumDetailCom
        QueryFileOfAlbumDetailComRespDto queryFileOfAlbumDetailComRespDto = null;
        QueryFileOfAlbumDetailComReqDto queryFileOfAlbumDetailComReqDto = new QueryFileOfAlbumDetailComReqDto();
        if (reqDto != null) {
            queryFileOfAlbumDetailComReqDto.setAlbumRelationId(reqDto.getAlbumRelationId());//SimpleFieldAssign//sourceId:2047738_1
            queryFileOfAlbumDetailComReqDto.setResourceFileId(reqDto.getResourceFileId());//SimpleFieldAssign//sourceId:2047739_1
        }

        /*D8查询专辑下文件详情(公共)[10534]   */
        Assert.isNull(queryFileOfAlbumDetailComReqDto.getResourceFileId(), "B8查询专辑文件详情-D8查询专辑下文件详情(公共)-资源文件ID不能为空", false);
        queryFileOfAlbumDetailComRespDto = fwDataassetsAlbumClient.queryFileOfAlbumDetailCom(queryFileOfAlbumDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryFileOfAlbumDetailComRespDto_1 = queryFileOfAlbumDetailComRespDto;

        BffQueryAlbumFileRelationDetailRespDto retData = new BffQueryAlbumFileRelationDetailRespDto();
        if (queryFileOfAlbumDetailComRespDto_1 != null) {
            retData.setResourceFileId(queryFileOfAlbumDetailComRespDto_1.getResourceFileId());//SimpleFieldAssign//sourceId:2047751_1
            retData.setResourceFileName(queryFileOfAlbumDetailComRespDto_1.getResourceFileName());//SimpleFieldAssign//sourceId:2047752_1
            retData.setResourceFileAlias(queryFileOfAlbumDetailComRespDto_1.getResourceFileAlias());//SimpleFieldAssign//sourceId:2047753_1
            retData.setResourceFileExtension(queryFileOfAlbumDetailComRespDto_1.getResourceFileExtension());//SimpleFieldAssign//sourceId:2047908_1
            retData.setResourceFileSummary(queryFileOfAlbumDetailComRespDto_1.getResourceFileSummary());//SimpleFieldAssign//sourceId:2047754_1
            retData.setIsEvi(queryFileOfAlbumDetailComRespDto_1.getIsEvi());//SimpleFieldAssign//sourceId:2047755_1
            retData.setCopyRightHolderName(queryFileOfAlbumDetailComRespDto_1.getCopyRightHolderName());//SimpleFieldAssign//sourceId:2047756_1
            retData.setEviRecordId(queryFileOfAlbumDetailComRespDto_1.getEviRecordId());//SimpleFieldAssign//sourceId:2047757_1
            retData.setHashCode(queryFileOfAlbumDetailComRespDto_1.getHashCode());//SimpleFieldAssign//sourceId:2047758_1
            retData.setResourceFileCataObjectId(queryFileOfAlbumDetailComRespDto_1.getResourceFileCataObjectId());//SimpleFieldAssign//sourceId:2047759_1
            retData.setCreateTime(queryFileOfAlbumDetailComRespDto_1.getCreateTime());//SimpleFieldAssign//sourceId:2047760_1
            retData.setOperateTime(queryFileOfAlbumDetailComRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:2047761_1
        }


        return retData;
    }

//    public Map<String,Object> addFileRelation(Map<String,Object> reqDto){
//        LoopAddAlbumFileRelationReqDto req = new LoopAddAlbumFileRelationReqDto();
//        req.setAlbumId((String)reqDto.get("albumId"));
//        List<String> list = (List<String>)reqDto.get("resourceFileList");
//        req.setResourceFileList(list);
//        LoopAddAlbumFileRelationRespDto res = fwDataassetsAlbumClient.loopAddAlbumFileRelation(req).getData();
//        return new HashMap<>();
//    }

    /**
     * B8查询专辑文件关系列表[10343]
     * gen by moon at 11/18/2024, 10:10:39 PM
     */
    @Trace(operationName = "B8查询专辑文件关系列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAlbumFileRelationListRespDto queryAlbumFileRelationList(BffQueryAlbumFileRelationListReqDto reqDto) {


        QueryAlbumFileRelationListComRespDto queryAlbumFileRelationListComRespDto_1 = null;
//步骤0: D8查询专辑文件关系列表(公共) - queryAlbumFileRelationListCom
        QueryAlbumFileRelationListComRespDto queryAlbumFileRelationListComRespDto = null;
        QueryAlbumFileRelationListComReqDto queryAlbumFileRelationListComReqDto = new QueryAlbumFileRelationListComReqDto();
        queryAlbumFileRelationListComReqDto.setIsValid("FALSE");//sourceId:2028868_1
        if (reqDto != null) {
            queryAlbumFileRelationListComReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2026901_1
            queryAlbumFileRelationListComReqDto.setResourceFileAlias(reqDto.getResourceFileAlias());//SimpleFieldAssign//sourceId:2026902_1
            queryAlbumFileRelationListComReqDto.setResourceFileType(reqDto.getResourceFileType());//SimpleFieldAssign//sourceId:2026903_1
            queryAlbumFileRelationListComReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:2028856_1
        }

        /*D8查询专辑文件关系列表(公共)[10330]   */
        Assert.isNull(queryAlbumFileRelationListComReqDto.getIsValid(), "B8查询专辑文件关系列表-D8查询专辑文件关系列表(公共)-是否作废不能为空", false);
        queryAlbumFileRelationListComRespDto = fwDataassetsAlbumClient.queryAlbumFileRelationListCom(queryAlbumFileRelationListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryAlbumFileRelationListComRespDto_1 = queryAlbumFileRelationListComRespDto;

        BffQueryAlbumFileRelationListRespDto retData = new BffQueryAlbumFileRelationListRespDto();
        if (queryAlbumFileRelationListComRespDto_1 != null) {
            retData.setAlbumFileRelationList(//objList-to-objLists
                    queryAlbumFileRelationListComRespDto_1.getAlbumFileRelationList().stream().map(item -> {
                        BffAlbumFileRelationDto elm = new BffAlbumFileRelationDto();
                        if (item != null) {
                            elm.setAlbumRelationId(item.getAlbumRelationId());//SimpleFieldAssign//sourceId:428072_2
                            elm.setResourceFileId(item.getResourceFileId());//SimpleFieldAssign//sourceId:428077_2
                            elm.setResourceFileAlias(item.getResourceFileAlias());//SimpleFieldAssign//sourceId:427166_2
                            elm.setResourceFileSize(item.getResourceFileSize());//SimpleFieldAssign//sourceId:427167_2
                            elm.setResourceFileExtension(item.getResourceFileExtension());//SimpleFieldAssign//sourceId:427168_2
                            elm.setResourceFileFullPath(item.getResourceFileRelaPath());//SimpleFieldAssign//sourceId:428073_2
                            elm.setResourceCopyRightType(item.getResourceCopyRightType());//SimpleFieldAssign//sourceId:427169_2
                            elm.setResourceCopyRightHolderId(item.getResourceCopyRightHolderId());//SimpleFieldAssign//sourceId:427170_2
                            elm.setCopyRightOriginalRoleMemberId(item.getCopyRightOriginalRoleMemberId());//SimpleFieldAssign//sourceId:427171_2
                            elm.setCopyrightOwnerName(item.getCopyrightOwnerName());//SimpleFieldAssign//sourceId:428087_2
                            elm.setSubjectLifeCycle(item.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:427172_2
                            elm.setCreateTime(item.getCreateTime());//SimpleFieldAssign//sourceId:427173_2
                        }
                        return elm;
                    }).collect(Collectors.toList()));//objList-to-objLists//sourceId:2026916_1
        }


        retData.setPageNum(queryAlbumFileRelationListComRespDto.getPageNum());
        retData.setPageSize(queryAlbumFileRelationListComRespDto.getPageSize());
        retData.setTotal(queryAlbumFileRelationListComRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryAlbumFileRelationListComRespDto.getTotalNum()) / Double.valueOf(queryAlbumFileRelationListComRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B8查询回收站列表[10358]
     * gen by moon at 11/21/2024, 9:45:48 PM
     */
    @Trace(operationName = "B8查询回收站列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryRecycleListRespDto queryRecycleList(BffQueryRecycleListReqDto reqDto) {


        QueryRecycleListRespDto queryRecycleListRespDto_1 = null;
//步骤0: D8查询回收站列表 - queryRecycleList
        QueryRecycleListRespDto queryRecycleListRespDto = null;
        QueryRecycleListReqDto queryRecycleListReqDto = new QueryRecycleListReqDto();
        queryRecycleListReqDto.setIsValid("TRUE");//sourceId:2027254_1
        if (reqDto != null) {
            queryRecycleListReqDto.setCreateOwnerObjectId(reqDto.getCreateOwnerObjectId());//SimpleFieldAssign//sourceId:2028910_1
        }

        /*D8查询回收站列表[10357]   */
        Assert.isNull(queryRecycleListReqDto.getCreateOwnerObjectId(), "B8查询回收站列表-D8查询回收站列表-创建于归属主体ID不能为空", false);
        Assert.isNull(queryRecycleListReqDto.getIsValid(), "B8查询回收站列表-D8查询回收站列表-是否作废不能为空", false);
        queryRecycleListRespDto = fwDataassetsAlbumClient.queryRecycleList(queryRecycleListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryRecycleListRespDto_1 = queryRecycleListRespDto;

        BffQueryRecycleListRespDto retData = new BffQueryRecycleListRespDto();
        if (queryRecycleListRespDto_1 != null) {
            retData.setRecycleList(queryRecycleListRespDto_1.getAlbumFileRelationList().stream().map(item -> BeanUtil.toBean(item, BffRecycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:2028115_1
        }


        retData.setPageNum(queryRecycleListRespDto.getPageNum());
        retData.setPageSize(queryRecycleListRespDto.getPageSize());
        retData.setTotal(queryRecycleListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryRecycleListRespDto.getTotalNum()) / Double.valueOf(queryRecycleListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B8移除专辑下文件[10367]
     * gen by moon at 5/26/2025, 9:43:02 PM
     */
    @Trace(operationName = "B8移除专辑下文件")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffRemoveFileOfAlbumRespDto removeFileOfAlbum(BffRemoveFileOfAlbumReqDto reqDto) {


        //步骤0: D8移除专辑下文件(公共) - removeFileOfAlbumCom
        RemoveFileOfAlbumComRespDto removeFileOfAlbumComRespDto = null;
        RemoveFileOfAlbumComReqDto removeFileOfAlbumComReqDto = new RemoveFileOfAlbumComReqDto();
        if (reqDto != null) {
            removeFileOfAlbumComReqDto.setResourceFileId(reqDto.getResourceFileId());//SimpleFieldAssign//sourceId:2047551_1
            removeFileOfAlbumComReqDto.setAlbumRelationId(reqDto.getAlbumRelationId());//SimpleFieldAssign//sourceId:2047552_1
        }

        /*D8移除专辑下文件(公共)[10364]   */
        Assert.isNull(removeFileOfAlbumComReqDto.getResourceFileId(), "B8移除专辑下文件-D8移除专辑下文件(公共)-资源文件ID不能为空", false);
        Assert.isNull(removeFileOfAlbumComReqDto.getAlbumRelationId(), "B8移除专辑下文件-D8移除专辑下文件(公共)-专辑文档关系ID不能为空", false);
        removeFileOfAlbumComRespDto = fwDataassetsAlbumClient.removeFileOfAlbumCom(removeFileOfAlbumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffRemoveFileOfAlbumRespDto retData = new BffRemoveFileOfAlbumRespDto();


        return retData;
    }

    /**
     * B8删除专辑下文件-回收站删除[10369]
     * gen by moon at 5/27/2025, 1:27:43 PM
     */
    @Trace(operationName = "B8删除专辑下文件-回收站删除")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteFileOfAlbumRespDto deleteFileOfAlbum(BffDeleteFileOfAlbumReqDto reqDto) {


        //步骤0: D8删除专辑下文件(公共) - deleteFileOfAlbumCom
        DeleteFileOfAlbumComRespDto deleteFileOfAlbumComRespDto = null;
        DeleteFileOfAlbumComReqDto deleteFileOfAlbumComReqDto = new DeleteFileOfAlbumComReqDto();
        if (reqDto != null) {
            deleteFileOfAlbumComReqDto.setResourceFileId(reqDto.getResourceFileId());//SimpleFieldAssign//sourceId:2027523_1
        }

        /*D8删除专辑下文件(公共)[10359]   */
        Assert.isNull(deleteFileOfAlbumComReqDto.getResourceFileId(), "B8删除专辑下文件-回收站删除-D8删除专辑下文件(公共)-资源文件ID不能为空", false);
        deleteFileOfAlbumComRespDto = fwDataassetsAlbumClient.deleteFileOfAlbumCom(deleteFileOfAlbumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffDeleteFileOfAlbumRespDto retData = new BffDeleteFileOfAlbumRespDto();


        return retData;
    }

    /**
     * B8批量删专辑下文件-清空回收站[10373]
     * gen by moon at 5/27/2025, 1:27:47 PM
     */
    @Trace(operationName = "B8批量删专辑下文件-清空回收站")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchDeleteFileOfAlbumRespDto batchDeleteFileOfAlbum(BffBatchDeleteFileOfAlbumReqDto reqDto) {


        //步骤0: D8查询资源文件列表(公共) - queryResourceFileListCom
        QueryResourceFileListComRespDto queryResourceFileListComRespDto = null;
        QueryResourceFileListComReqDto queryResourceFileListComReqDto = new QueryResourceFileListComReqDto();
        queryResourceFileListComReqDto.setIsValid("TRUE");//sourceId:2047879_1
        if (reqDto != null) {
            queryResourceFileListComReqDto.setResourceCopyRightType(reqDto.getResourceCopyRightType());//SimpleFieldAssign//sourceId:2047876_1
            queryResourceFileListComReqDto.setResourceCopyRightHolderId(reqDto.getResourceCopyRightHolderId());//SimpleFieldAssign//sourceId:2047877_1
            queryResourceFileListComReqDto.setCopyRightOriginalRoleMemberId(reqDto.getCopyRightOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2047878_1
        }

        /*D8查询回收站列表-用于删除[10393]   */
        Assert.isNull(queryResourceFileListComReqDto.getResourceCopyRightType(), "B8批量删专辑下文件-清空回收站-D8查询回收站列表-用于删除-资源文件版权归属类型不能为空", false);
        Assert.isNull(queryResourceFileListComReqDto.getIsValid(), "B8批量删专辑下文件-清空回收站-D8查询回收站列表-用于删除-是否作废不能为空", false);
        queryResourceFileListComRespDto = fwDataassetsResourceFileClient.queryResourceFileListCom(queryResourceFileListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//步骤1: D8批量删专辑下文件 - batchDeleteFileOfAlbum
        BatchDeleteFileOfAlbumRespDto batchDeleteFileOfAlbumRespDto = null;
        if (queryResourceFileListComRespDto != null) {
            BatchDeleteFileOfAlbumReqDto batchDeleteFileOfAlbumReqDto = new BatchDeleteFileOfAlbumReqDto();
            if (queryResourceFileListComRespDto != null && queryResourceFileListComRespDto.getResourceFileList() != null && !CollectionUtil.isEmpty(queryResourceFileListComRespDto.getResourceFileList())) {
                batchDeleteFileOfAlbumReqDto.setResourceFileList(queryResourceFileListComRespDto.getResourceFileList().stream().map(item -> item.getResourceFileId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:2047900_1
            }

            /*D8批量删专辑下文件[10370]   */

            batchDeleteFileOfAlbumRespDto = fwDataassetsAlbumClient.batchDeleteFileOfAlbum(batchDeleteFileOfAlbumReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }

        BffBatchDeleteFileOfAlbumRespDto retData = new BffBatchDeleteFileOfAlbumRespDto();


        return retData;
    }

    /**
     * B8复制专辑和专辑下文件[10374]
     * gen by moon at 11/21/2024, 9:46:01 PM
     */
    @Trace(operationName = "B8复制专辑和专辑下文件")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffCopyAlbumRespDto copyAlbum(BffCopyAlbumReqDto reqDto) {


        //步骤0: D8复制专辑 - copyAlbum
        CopyAlbumRespDto copyAlbumRespDto = null;
        CopyAlbumReqDto copyAlbumReqDto = new CopyAlbumReqDto();
        if (reqDto != null) {
            copyAlbumReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2027583_1
            copyAlbumReqDto.setAlbumName(reqDto.getAlbumName());//SimpleFieldAssign//sourceId:2027584_1
            copyAlbumReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:2027588_1
            copyAlbumReqDto.setAlbumOwner(reqDto.getAlbumOwner());//SimpleFieldAssign//sourceId:2027585_1
            copyAlbumReqDto.setAlbumOwnerId(reqDto.getAlbumOwnerId());//SimpleFieldAssign//sourceId:2027586_1
            copyAlbumReqDto.setCopyRightOriginalRoleMemberId(reqDto.getCopyRightOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2027587_1
            copyAlbumReqDto.setCreateOwnerObjectId(reqDto.getCreateOwnerObjectId());//SimpleFieldAssign//sourceId:2028951_1
        }

        /*D8复制专辑[10363]   */
        Assert.isNull(copyAlbumReqDto.getAlbumId(), "B8复制专辑和专辑下文件-D8复制专辑-专辑ID不能为空", false);
        Assert.isNull(copyAlbumReqDto.getAlbumName(), "B8复制专辑和专辑下文件-D8复制专辑-专辑名称不能为空", false);
        Assert.isNull(copyAlbumReqDto.getSubjectLifeCycle(), "B8复制专辑和专辑下文件-D8复制专辑-主体生命周期不能为空", false);
        Assert.isNull(copyAlbumReqDto.getAlbumOwner(), "B8复制专辑和专辑下文件-D8复制专辑-版权归属类型不能为空", false);
        Assert.isNull(copyAlbumReqDto.getAlbumOwnerId(), "B8复制专辑和专辑下文件-D8复制专辑-版权归属对象ID不能为空", false);
        Assert.isNull(copyAlbumReqDto.getCreateOwnerObjectId(), "B8复制专辑和专辑下文件-D8复制专辑-创建于归属主体ID不能为空", false);
        copyAlbumRespDto = fwDataassetsAlbumClient.copyAlbum(copyAlbumReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffCopyAlbumRespDto retData = new BffCopyAlbumRespDto();


        return retData;
    }

    /**
     * B2修改专辑存档操作[10354]
     * gen by moon at 11/15/2024, 4:56:53 PM
     */
    @Trace(operationName = "B2修改专辑存档操作")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateAlbumArchiveOperRespDto updateAlbumArchiveOper(BffUpdateAlbumArchiveOperReqDto reqDto) {


        //步骤0: D8查询专辑详情(公共) - queryAlbumDetailCom
        QueryAlbumDetailComRespDto queryAlbumDetailComRespDto = null;
        QueryAlbumDetailComReqDto queryAlbumDetailComReqDto = new QueryAlbumDetailComReqDto();
        if (reqDto != null) {
            queryAlbumDetailComReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2026968_1
        }

        /*D8查询专辑详情(公共)[10327]   */
        Assert.isNull(queryAlbumDetailComReqDto.getAlbumId(), "B8删除专辑-D8查询专辑详情(公共)-专辑ID不能为空", false);
        queryAlbumDetailComRespDto = fwDataassetsAlbumClient.queryAlbumDetailCom(queryAlbumDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//步骤1: D8执行生命周期判断(公共) - implementSubjectLifeCycleJudgeCom
        ImplementSubjectLifeCycleJudgeComRespDto implementSubjectLifeCycleJudgeComRespDto = null;
        if (queryAlbumDetailComRespDto != null) {
            ImplementSubjectLifeCycleJudgeComReqDto implementSubjectLifeCycleJudgeComReqDto = new ImplementSubjectLifeCycleJudgeComReqDto();
            implementSubjectLifeCycleJudgeComReqDto.setLifecyCycleOperationType("ACHIVE");//sourceId:2026980_1
            if (queryAlbumDetailComRespDto != null) {
                implementSubjectLifeCycleJudgeComReqDto.setSubjectLifeCycle(queryAlbumDetailComRespDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:2026979_1
                implementSubjectLifeCycleJudgeComReqDto.setIsValid(queryAlbumDetailComRespDto.getIsValid());//SimpleFieldAssign//sourceId:2026981_1
            }

            /*D8执行生命周期判断(公共)[10346]   */
            Assert.isNull(implementSubjectLifeCycleJudgeComReqDto.getLifecyCycleOperationType(), "B8删除专辑-D8执行生命周期判断(公共)-生命周期操作类型不能为空", false);
            Assert.isNull(implementSubjectLifeCycleJudgeComReqDto.getSubjectLifeCycle(), "B8删除专辑-D8执行生命周期判断(公共)-主体生命周期不能为空", false);
            Assert.isNull(implementSubjectLifeCycleJudgeComReqDto.getIsValid(), "B8删除专辑-D8执行生命周期判断(公共)-是否作废不能为空", false);
            implementSubjectLifeCycleJudgeComRespDto = fwDataassetsUnstructuredResourcesClient.implementSubjectLifeCycleJudgeCom(implementSubjectLifeCycleJudgeComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
        }

        //步骤0: D8修改专辑存档 - updateAlbumArchive
        UpdateArchiveAlbumOperRespDto updateAlbumArchiveRespDto = null;
        UpdateArchiveAlbumOperReqDto updateAlbumArchiveReqDto = new UpdateArchiveAlbumOperReqDto();
        if (reqDto != null) {
            updateAlbumArchiveReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2027193_1
        }

        /*D8修改专辑存档[10353]   */
        Assert.isNull(updateAlbumArchiveReqDto.getAlbumId(), "B8修改专辑存档-D8修改专辑存档-专辑ID不能为空", false);
        updateAlbumArchiveRespDto = fwDataassetsAlbumClient.updateArchiveAlbumOper(updateAlbumArchiveReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffUpdateAlbumArchiveOperRespDto retData = new BffUpdateAlbumArchiveOperRespDto();


        return retData;
    }

    /**
     * B8新增专辑文件关系[10389]
     * gen by moon at 12/7/2024, 9:30:22 PM
     */
    @Trace(operationName = "B8新增专辑文件关系")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffLoopAddAlbumFileRelationRespDto loopAddAlbumFileRelation(BffLoopAddAlbumFileRelationReqDto reqDto) {


        //步骤0: D8新增专辑文件关系 - loopAddAlbumFileRelation
        LoopAddAlbumFileRelationRespDto loopAddAlbumFileRelationRespDto = null;
        LoopAddAlbumFileRelationReqDto loopAddAlbumFileRelationReqDto = new LoopAddAlbumFileRelationReqDto();
        loopAddAlbumFileRelationReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:2031281_1
        if (reqDto != null) {
            loopAddAlbumFileRelationReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2028825_1
            loopAddAlbumFileRelationReqDto.setCreateOwnerObjectId(reqDto.getCreateOwnerObjectId());//SimpleFieldAssign//sourceId:2028905_1
            loopAddAlbumFileRelationReqDto.setCopyrightOwnerName(reqDto.getCopyrightOwnerName());//SimpleFieldAssign//sourceId:2028892_1
        }
        if (reqDto != null && reqDto.getResourceFileList() != null && !CollectionUtil.isEmpty(reqDto.getResourceFileList())) {
            loopAddAlbumFileRelationReqDto.setResourceFileList(reqDto.getResourceFileList().stream().map(item -> BeanUtil.toBean(item, ResourceFileDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:2028819_1
        }

        /*D8新增专辑文件关系（用于上传文件后续调用）[10388]   */
        Assert.isNull(loopAddAlbumFileRelationReqDto.getAlbumId(), "B8新增专辑文件关系-D8新增专辑文件关系（用于上传文件后续调用）-关联专辑ID不能为空", false);
        Assert.isNull(loopAddAlbumFileRelationReqDto.getCreateOwnerObjectId(), "B8新增专辑文件关系-D8新增专辑文件关系（用于上传文件后续调用）-创建于归属主体ID不能为空", false);
        Assert.isNull(loopAddAlbumFileRelationReqDto.getSpaceId(), "B8新增专辑文件关系-D8新增专辑文件关系（用于上传文件后续调用）-空间ID不能为空", false);
        loopAddAlbumFileRelationRespDto = fwDataassetsAlbumClient.loopAddAlbumFileRelation(loopAddAlbumFileRelationReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffLoopAddAlbumFileRelationRespDto retData = new BffLoopAddAlbumFileRelationRespDto();


        return retData;
    }

    /**
     * B8移动文件到指定专辑[10514]
     * gen by moon at 3/30/2025, 3:39:40 PM
     */
    @Trace(operationName = "B8移动文件到指定专辑")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffMoveFilesToSpecAlbumRespDto moveFilesToSpecAlbum(BffMoveFilesToSpecAlbumReqDto reqDto) {


        //步骤0: D8移动文件到指定专辑 - moveFilesToSpecAlbum
        MoveFilesToSpecAlbumRespDto moveFilesToSpecAlbumRespDto = null;
        MoveFilesToSpecAlbumReqDto moveFilesToSpecAlbumReqDto = new MoveFilesToSpecAlbumReqDto();
        if (reqDto != null) {
            moveFilesToSpecAlbumReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2044031_1
        }
        if (reqDto != null && reqDto.getAlbumFileRelationList() != null && !CollectionUtil.isEmpty(reqDto.getAlbumFileRelationList())) {
            moveFilesToSpecAlbumReqDto.setAlbumFileRelationList(reqDto.getAlbumFileRelationList().stream().map(item -> BeanUtil.toBean(item, AlbumFileRelationDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:2044030_1
        }

        /*D8移动文件到指定专辑[10513]   */
        Assert.isNull(moveFilesToSpecAlbumReqDto.getAlbumId(), "B8移动文件到指定专辑-D8移动文件到指定专辑-关联专辑ID不能为空", false);
        moveFilesToSpecAlbumRespDto = fwDataassetsAlbumClient.moveFilesToSpecAlbum(moveFilesToSpecAlbumReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffMoveFilesToSpecAlbumRespDto retData = new BffMoveFilesToSpecAlbumRespDto();


        return retData;
    }

    /**
     * B8编入文件到指定专辑[10516]
     * gen by moon at 5/26/2025, 9:43:05 PM
     */
    @Trace(operationName = "B8编入文件到指定专辑")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffCopyFilesToSpecAlbumRespDto copyFilesToSpecAlbum(BffCopyFilesToSpecAlbumReqDto reqDto) {


        //步骤0: D8复制或移动文件到指定专辑 - copyFilesToSpecAlbum
        CopyFilesToSpecAlbumRespDto copyFilesToSpecAlbumRespDto = null;
        CopyFilesToSpecAlbumReqDto copyFilesToSpecAlbumReqDto = new CopyFilesToSpecAlbumReqDto();
        if (reqDto != null) {
            copyFilesToSpecAlbumReqDto.setAlbumId(reqDto.getAlbumId());//SimpleFieldAssign//sourceId:2047468_1
            copyFilesToSpecAlbumReqDto.setCreateOwnerObjectId(reqDto.getCreateOwnerObjectId());//SimpleFieldAssign//sourceId:2047469_1
            copyFilesToSpecAlbumReqDto.setCopyRightHolderName(reqDto.getCopyRightHolderName());//SimpleFieldAssign//sourceId:2047470_1
        }
        if (reqDto != null && reqDto.getAlbumFileRelationList() != null && !CollectionUtil.isEmpty(reqDto.getAlbumFileRelationList())) {
            copyFilesToSpecAlbumReqDto.setAlbumFileRelationList(reqDto.getAlbumFileRelationList().stream().map(item -> BeanUtil.toBean(item, AlbumFileRelationDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:2047471_1
        }

        /*D8复制或移动文件到指定专辑[10515]   */
        Assert.isNull(copyFilesToSpecAlbumReqDto.getAlbumId(), "B8编入文件到指定专辑-D8复制或移动文件到指定专辑-关联专辑ID不能为空", false);
        Assert.isNull(copyFilesToSpecAlbumReqDto.getCreateOwnerObjectId(), "B8编入文件到指定专辑-D8复制或移动文件到指定专辑-创建于归属主体ID不能为空", false);
        Assert.isNull(copyFilesToSpecAlbumReqDto.getCopyRightHolderName(), "B8编入文件到指定专辑-D8复制或移动文件到指定专辑-版权归属对象名称不能为空", false);
        copyFilesToSpecAlbumRespDto = fwDataassetsAlbumClient.copyFilesToSpecAlbum(copyFilesToSpecAlbumReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffCopyFilesToSpecAlbumRespDto retData = new BffCopyFilesToSpecAlbumRespDto();


        return retData;
    }

    /**
     * B8批量移除专辑下文件[10530]
     * gen by moon at 5/24/2025, 2:57:50 PM
     */
    @Trace(operationName = "B8批量移除专辑下文件")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchRemoveAlbumFileRelationRespDto batchRemoveAlbumFileRelation(BffBatchRemoveAlbumFileRelationReqDto reqDto) {


        //步骤0: D8批量移除专辑下文件 - updateAlbumFilesRelationCom
        UpdateAlbumFilesRelationComRespDto updateAlbumFilesRelationComRespDto = null;
        UpdateAlbumFilesRelationComReqDto updateAlbumFilesRelationComReqDto = new UpdateAlbumFilesRelationComReqDto();
        if (reqDto != null && reqDto.getAlbumFileRelationList() != null && !CollectionUtil.isEmpty(reqDto.getAlbumFileRelationList())) {
            updateAlbumFilesRelationComReqDto.setAlbumFileRelationList(reqDto.getAlbumFileRelationList().stream().map(item -> BeanUtil.toBean(item, AlbumFileRelationDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:2047280_1
        }

        /*D8批量移除专辑下文件[10531]   */

        updateAlbumFilesRelationComRespDto = fwDataassetsAlbumClient.updateAlbumFilesRelationCom(updateAlbumFilesRelationComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffBatchRemoveAlbumFileRelationRespDto retData = new BffBatchRemoveAlbumFileRelationRespDto();


        return retData;
    }

    /**
     * B8批量存档专辑下文件[10533]
     * gen by moon at 5/24/2025, 8:23:34 PM
     */
    @Trace(operationName = "B8批量存档专辑下文件")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchArchiveAlbumFileRelationRespDto batchArchiveAlbumFileRelation(BffBatchArchiveAlbumFileRelationReqDto reqDto) {


        //步骤0: D8批量存档专辑下文件 - batchArchiveAlbumFileRelation
        BatchArchiveAlbumFileRelationRespDto batchArchiveAlbumFileRelationRespDto = null;
        BatchArchiveAlbumFileRelationReqDto batchArchiveAlbumFileRelationReqDto = new BatchArchiveAlbumFileRelationReqDto();
        if (reqDto != null) {
            batchArchiveAlbumFileRelationReqDto.setAlbumFileRelationList(reqDto.getAlbumFileRelationList());//list-field-assign//sourceId:2047327_1
        }

        /*D8批量存档专辑下文件[10532]   */

        batchArchiveAlbumFileRelationRespDto = fwDataassetsAlbumClient.batchArchiveAlbumFileRelation(batchArchiveAlbumFileRelationReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffBatchArchiveAlbumFileRelationRespDto retData = new BffBatchArchiveAlbumFileRelationRespDto();


        return retData;
    }

    /**
     * B8执行丢回收站[10536]
     * gen by moon at 5/27/2025, 1:27:55 PM
     */
    @Trace(operationName = "B8执行丢回收站")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementRecycleRespDto implementRecycle(BffImplementRecycleReqDto reqDto) {


        //步骤0: D8执行丢回收站(公共) - implementRecycleCom
        ImplementRecycleComRespDto implementRecycleComRespDto = null;
        ImplementRecycleComReqDto implementRecycleComReqDto = new ImplementRecycleComReqDto();
        if (reqDto != null) {
            implementRecycleComReqDto.setAlbumRelationId(reqDto.getAlbumRelationId());//SimpleFieldAssign//sourceId:2047846_1
            implementRecycleComReqDto.setResourceFileId(reqDto.getResourceFileId());//SimpleFieldAssign//sourceId:2047847_1
        }

        /*D8执行丢回收站(公共)[10535]   */
        Assert.isNull(implementRecycleComReqDto.getAlbumRelationId(), "B8执行丢回收站-D8执行丢回收站(公共)-专辑文档关系ID不能为空", false);
        Assert.isNull(implementRecycleComReqDto.getResourceFileId(), "B8执行丢回收站-D8执行丢回收站(公共)-资源文件ID不能为空", false);
        implementRecycleComRespDto = fwDataassetsAlbumClient.implementRecycleCom(implementRecycleComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementRecycleRespDto retData = new BffImplementRecycleRespDto();


        return retData;
    }
    //
}
